/*! * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2016 * @version 1.3.4 * * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. * @see http://php.net/manual/en/function.date.php * * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related demos visit http://demos.krajee.com */ /* jQuery DateTimePicker @homepage http://xdsoft.net/jqplugins/datetimepicker/ @author Chupurnov Valeriy () */ var DateFormatter; !function(){var b,p,t,e,v;b=function(b,m){return"string"==typeof b&&"string"==typeof m&&b.toLowerCase()===m.toLowerCase()};p=function(b,m,d){b=b.toString();return b.lengthc?"20":"19")+f):c;a=!0;break;case "m":case "n":case "M":case "F":if(isNaN(c)){if(u= this.getMonth(f),!(0=c))return null;B=c}a=!0;break;case "d":case "j":if(!(1<=c&&31>=c))return null;H=c;a=!0;break;case "g":case "h":if(A=-1=c&&-1=c&&(D=c);else{if(!(0<=c&&23>=c))return null;D=c}w=!0;break;case "G":case "H":if(!(0<=c&&23>=c))return null;D=c;w=!0;break;case "i":if(!(0<=c&&59>=c))return null; F=c;w=!0;break;case "s":if(!(0<=c&&59>=c))return null;t=c;w=!0}if(!0===a&&p&&B&&H)n=new Date(p,B-1,H,D,F,t,0);else{if(!0!==w)return null;n=new Date(0,0,0,D,F,t,0)}return n},guessDate:function(b,e){if("string"!=typeof b)return b;var d,n,l,f,c,u,A=b.replace(this.separators,"\x00").split("\x00"),w=e.match(this.validParts),a=new Date;f=0;if(!/^[djmn]/g.test(w[0]))return b;for(l=0;ld?d:4,n=parseInt(4>d?n.toString().substr(0,4-d)+c:c.substr(0,4)),!n)return null;a.setFullYear(n);break;case 3:a.setHours(u);break;case 4:a.setMinutes(u);break;case 5:a.setSeconds(u)}f=c.substr(f);0c?1:1===b&&9d.G()?0:1;return l.meridiem[b]},B:function(){var b=3600*e.getUTCHours(),c=60*e.getUTCMinutes(),d=e.getUTCSeconds(); return p(Math.floor((b+c+d+3600)/86.4)%1E3,3)},g:function(){return d.G()%12||12},G:function(){return e.getHours()},h:function(){return p(d.g(),2)},H:function(){return p(d.G(),2)},i:function(){return p(e.getMinutes(),2)},s:function(){return p(e.getSeconds(),2)},u:function(){return p(1E3*e.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(e))[1]||"Coordinated Universal Time"},I:function(){var b=new Date(d.Y(),0),c=Date.UTC(d.Y(),0),e=new Date(d.Y(),6),a=Date.UTC(d.Y(),6);return b-c!== e-a?1:0},O:function(){var b=e.getTimezoneOffset(),c=Math.abs(b);return(0d;d++)c=e.charAt(d),"S"!==c&&"\\"!==c&&(0'),p=b('
'),n.append(p),e.addClass("xdsoft_scroller_box").append(n),O=function(a){a=f(a).y-v+P;0>a&&(a=0);a+p[0].offsetHeight>C&& (a=C-p[0].offsetHeight);e.trigger("scroll_element.xdsoft_scroller",[D?a/D:0])},p.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(a){l||e.trigger("resize_scroll.xdsoft_scroller",[d]);v=f(a).y;P=parseInt(p.css("margin-top"),10);C=n[0].offsetHeight;"mousedown"===a.type||"touchstart"===a.type?(c.ownerDocument&&b(c.ownerDocument.body).addClass("xdsoft_noselect"),b([c.ownerDocument.body,c.contentWindow]).on("touchend mouseup.xdsoft_scroller",function y(){b([c.ownerDocument.body,c.contentWindow]).off("touchend mouseup.xdsoft_scroller", y).off("mousemove.xdsoft_scroller",O).removeClass("xdsoft_noselect")}),b(c.ownerDocument.body).on("mousemove.xdsoft_scroller",O)):(L=!0,a.stopPropagation(),a.preventDefault())}).on("touchmove",function(a){L&&(a.preventDefault(),O(a))}).on("touchend touchcancel",function(){L=!1;P=0}),e.on("scroll_element.xdsoft_scroller",function(b,c){l||e.trigger("resize_scroll.xdsoft_scroller",[c,!0]);c=1c||isNaN(c)?0:c;p.css("margin-top",D*c);setTimeout(function(){a.css("marginTop",-parseInt((a[0].offsetHeight- l)*c,10))},10)}).on("resize_scroll.xdsoft_scroller",function(b,c,d){var h;l=e[0].clientHeight;m=a[0].offsetHeight;b=l/m;h=b*n[0].offsetHeight;1c&&(c=0);e.trigger("scroll_element.xdsoft_scroller",[c/ (m-l)]);b.stopPropagation();return!1}),e.on("touchstart",function(b){t=f(b);h=Math.abs(parseInt(a.css("marginTop"),10))}),e.on("touchmove",function(a){t&&(a.preventDefault(),a=f(a),e.trigger("scroll_element.xdsoft_scroller",[(h-(a.y-t.y))/(m-l)]))}),e.on("touchend touchcancel",function(){t=!1;h=0})),e.trigger("resize_scroll.xdsoft_scroller",[d]))})};b.fn.datetimepicker=function(c,d){var f=this,l=!1,a=b.isPlainObject(c)||!c?b.extend(!0,{},t,c):b.extend(!0,{},t),m=0,n,v,H=function(a){a.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart", function V(){a.is(":disabled")||a.data("xdsoft_datetimepicker")||(clearTimeout(m),m=setTimeout(function(){a.data("xdsoft_datetimepicker")||n(a);a.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",V).trigger("open.xdsoft")},100))})};n=function(d){function f(){var b=!1,r;a.startDate?b=k.strToDate(a.startDate):(b=a.value||(d&&d.val&&d.val()?d.val():""))?(b=k.strToDateTime(b),a.yearOffset&&(b=new Date(b.getFullYear()-a.yearOffset,b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds(), b.getMilliseconds()))):a.defaultDate&&(b=k.strToDateTime(a.defaultDate),a.defaultTime&&(r=k.strtotime(a.defaultTime),b.setHours(r.getHours()),b.setMinutes(r.getMinutes())));b&&k.isValidDate(b)?h.data("changed",!0):b="";return b||0}function m(a){var r=function(a,b){var g=a.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return(new RegExp(g)).test(b)},c=function(b, r){b="string"===typeof b||b instanceof String?a.ownerDocument.getElementById(b):b;if(!b)return!1;if(b.createTextRange){var c=b.createTextRange();c.collapse(!0);c.moveEnd("character",r);c.moveStart("character",r);c.select();return!0}return b.setSelectionRange?(b.setSelectionRange(r,r),!0):!1};a.mask&&d.off("keydown.xdsoft");!0===a.mask&&(a.mask=e.formatMask?e.formatMask(a.format):a.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g, "59").replace(/s/g,"59"));"string"===b.type(a.mask)&&(r(a.mask,d.val())||(d.val(a.mask.replace(/[0-9]/g,"_")),c(d[0],0)),d.on("paste.xdsoft",function(e){var h=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),k=this.value,f=this.selectionStart,l=k.substr(0,f),k=k.substr(f+h.length),k=l+h+k,f=f+h.length;r(a.mask,k)?(this.value=k,c(this,f)):""===b.trim(k)?this.value=a.mask.replace(/[0-9]/g,"_"):d.trigger("error_input.xdsoft");e.preventDefault();return!1}),d.on("keydown.xdsoft", function(e){var h=this.value,k=e.which,f=this.selectionStart,m=this.selectionEnd,n=f!==m,t;if(48<=k&&57>=k||96<=k&&105>=k||8===k||46===k){t=8===k||46===k?"_":String.fromCharCode(96<=k&&105>=k?k-48:k);for(8===k&&f&&!n&&--f;;){var p=a.mask.substr(f,1),u=f'),n=b(''), u=b('
'),t=b('
'),A=b('
'),v=b('
'), q=v.find(".xdsoft_time_box").eq(0),y=b('
'),B=b(''),H=b('
'),R=b('
'),I=!1,S,G,E,J,T=0,k,U;a.id&&h.attr("id",a.id);a.style&&h.attr("style",a.style);a.weeks&&h.addClass("xdsoft_showweeks");a.rtl&&h.addClass("xdsoft_rtl");h.addClass("xdsoft_"+a.theme); h.addClass(a.className);t.find(".xdsoft_month span").after(H);t.find(".xdsoft_year span").after(R);t.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(g){var r=b(this).find(".xdsoft_select").eq(0),c=0,d=0,e=r.is(":visible"),h;t.find(".xdsoft_select").hide();k.currentTime&&(c=k.currentTime[b(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]());r[e?"hide":"show"]();e=r.find("div.xdsoft_option");for(h=0;ha.touchMovedThreshold&&(this.touchMoved=!0)};t.find(".xdsoft_select").xdsoftScroller(a).on("touchstart mousedown.xdsoft",function(a){var b=a.originalEvent; this.touchMoved=!1;this.touchStartPosition=b.touches?b.touches[0]:b;a.stopPropagation();a.preventDefault()}).on("touchmove",".xdsoft_option",K).on("touchend mousedown.xdsoft",".xdsoft_option",function(){if(!this.touchMoved){if(void 0===k.currentTime||null===k.currentTime)k.currentTime=k.now();var g=k.currentTime.getFullYear();if(k&&k.currentTime)k.currentTime[b(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](b(this).data("value"));b(this).parent().parent().hide(); h.trigger("xchange.xdsoft");a.onChangeMonth&&b.isFunction(a.onChangeMonth)&&a.onChangeMonth.call(h,k.currentTime,h.data("input"));g!==k.currentTime.getFullYear()&&b.isFunction(a.onChangeYear)&&a.onChangeYear.call(h,k.currentTime,h.data("input"))}});h.getValue=function(){return k.getCurrentTime()};h.setOptions=function(g){var r={};a=b.extend(!0,{},a,g);g.allowTimes&&b.isArray(g.allowTimes)&&g.allowTimes.length&&(a.allowTimes=b.extend(!0,[],g.allowTimes));g.weekends&&b.isArray(g.weekends)&&g.weekends.length&& (a.weekends=b.extend(!0,[],g.weekends));g.allowDates&&b.isArray(g.allowDates)&&g.allowDates.length&&(a.allowDates=b.extend(!0,[],g.allowDates));g.allowDateRe&&"[object String]"===Object.prototype.toString.call(g.allowDateRe)&&(a.allowDateRe=new RegExp(g.allowDateRe));g.highlightedDates&&b.isArray(g.highlightedDates)&&g.highlightedDates.length&&(b.each(g.highlightedDates,function(g,c){var d=b.map(c.split(","),b.trim),h=new p(e.parseDate(d[0],a.formatDate),d[1],d[2]),k=e.formatDate(h.date,a.formatDate); void 0!==r[k]?(d=r[k].desc)&&d.length&&h.desc&&h.desc.length&&(r[k].desc=d+"\n"+h.desc):r[k]=h}),a.highlightedDates=b.extend(!0,[],r));g.highlightedPeriods&&b.isArray(g.highlightedPeriods)&&g.highlightedPeriods.length&&(r=b.extend(!0,[],a.highlightedDates),b.each(g.highlightedPeriods,function(g,c){var d,h,k,f,l,m,n;b.isArray(c)?(d=c[0],h=c[1],k=c[2],n=c[3]):(f=b.map(c.split(","),b.trim),d=e.parseDate(f[0],a.formatDate),h=e.parseDate(f[1],a.formatDate),k=f[2],n=f[3]);for(;d<=h;)f=new p(d,k,n),l=e.formatDate(d, a.formatDate),d.setDate(d.getDate()+1),void 0!==r[l]?(m=r[l].desc)&&m.length&&f.desc&&f.desc.length&&(r[l].desc=m+"\n"+f.desc):r[l]=f}),a.highlightedDates=b.extend(!0,[],r));g.disabledDates&&b.isArray(g.disabledDates)&&g.disabledDates.length&&(a.disabledDates=b.extend(!0,[],g.disabledDates));g.disabledWeekDays&&b.isArray(g.disabledWeekDays)&&g.disabledWeekDays.length&&(a.disabledWeekDays=b.extend(!0,[],g.disabledWeekDays));!a.open&&!a.opened||a.inline||d.trigger("open.xdsoft");a.inline&&(I=!0,h.addClass("xdsoft_inline"), d.after(h).hide());a.inverseButton&&(a.next="xdsoft_prev",a.prev="xdsoft_next");a.datepicker?u.addClass("active"):u.removeClass("active");a.timepicker?v.addClass("active"):v.removeClass("active");a.value&&(k.setCurrentTime(a.value),d&&d.val&&d.val(k.str));isNaN(a.dayOfWeekStart)?a.dayOfWeekStart=0:a.dayOfWeekStart=parseInt(a.dayOfWeekStart,10)%7;a.timepickerScrollbar||q.xdsoftScroller(a,"hide");a.minDate&&/^[\+\-](.*)$/.test(a.minDate)&&(a.minDate=e.formatDate(k.strToDateTime(a.minDate),a.formatDate)); a.maxDate&&/^[\+\-](.*)$/.test(a.maxDate)&&(a.maxDate=e.formatDate(k.strToDateTime(a.maxDate),a.formatDate));a.minDateTime&&/^\+(.*)$/.test(a.minDateTime)&&(a.minDateTime=k.strToDateTime(a.minDateTime).dateFormat(a.formatDate));a.maxDateTime&&/^\+(.*)$/.test(a.maxDateTime)&&(a.maxDateTime=k.strToDateTime(a.maxDateTime).dateFormat(a.formatDate));B.toggle(a.showApplyButton);t.find(".xdsoft_today_button").css("visibility",a.todayButton?"visible":"hidden");t.find("."+a.prev).css("visibility",a.prevButton? "visible":"hidden");t.find("."+a.next).css("visibility",a.nextButton?"visible":"hidden");m(a);if(a.validateOnBlur)d.off("blur.xdsoft").on("blur.xdsoft",function(){if(a.allowBlank&&(!b.trim(b(this).val()).length||"string"===typeof a.mask&&b.trim(b(this).val())===a.mask.replace(/[0-9]/g,"_")))b(this).val(null),h.data("xdsoft_datetime").empty();else{var r=e.parseDate(b(this).val(),a.format);if(r)b(this).val(e.formatDate(r,a.format));else{var r=+[b(this).val()[0],b(this).val()[1]].join(""),g=+[b(this).val()[2], b(this).val()[3]].join("");!a.datepicker&&a.timepicker&&0<=r&&24>r&&0<=g&&60>g?b(this).val([r,g].map(function(a){return 9c||(d.val(k.str()),d.trigger("change"),h.trigger("close.xdsoft")))});t.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var c= b(this),d=0,h=!1;(function X(b){c.hasClass(a.next)?k.nextMonth():c.hasClass(a.prev)&&k.prevMonth();a.monthChangeSpinner&&(h||(d=setTimeout(X,b||100)))})(500);b([a.ownerDocument.body,a.contentWindow]).on("touchend mouseup.xdsoft",function Q(){clearTimeout(d);h=!0;b([a.ownerDocument.body,a.contentWindow]).off("touchend mouseup.xdsoft",Q)})});v.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var c=b(this),d=0,h=!1,e=110;(function Q(b){var k=q[0].clientHeight,f=y[0].offsetHeight, l=Math.abs(parseInt(y.css("marginTop"),10));c.hasClass(a.next)&&f-k-a.timeHeightInTimePicker>=l?y.css("marginTop","-"+(l+a.timeHeightInTimePicker)+"px"):c.hasClass(a.prev)&&0<=l-a.timeHeightInTimePicker&&y.css("marginTop","-"+(l-a.timeHeightInTimePicker)+"px");q.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(y[0].style.marginTop,10)/(f-k))]);e=10";a.weeks&&(g+="");for(m=0;7>m;m+= 1)g+=""+a.i18n[C].dayOfWeekShort[(m+a.dayOfWeekStart)%7]+"";g+="";!1!==a.maxDate&&(p=k.strToDate(a.maxDate),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59,999));!1!==a.minDate&&(w=k.strToDate(a.minDate),w=new Date(w.getFullYear(),w.getMonth(),w.getDate()));!1!==a.minDateTime&&(u=k.strToDate(a.minDateTime),u=new Date(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds()));!1!==a.maxDateTime&&(q=k.strToDate(a.maxDateTime),q=new Date(q.getFullYear(), q.getMonth(),q.getDate(),q.getHours(),q.getMinutes(),q.getSeconds()));var J;for(!1!==q&&(J=31*(12*q.getFullYear()+q.getMonth())+q.getDate());lp||!1!==u&&fJ||F&&!1===F[0])&&x.push("xdsoft_disabled");-1!==a.disabledDates.indexOf(e.formatDate(f,a.formatDate))&&x.push("xdsoft_disabled");-1!==a.disabledWeekDays.indexOf(v)&&x.push("xdsoft_disabled");d.is("[disabled]")&& x.push("xdsoft_disabled");F&&""!==F[1]&&x.push(F[1]);k.currentTime.getMonth()!==z&&x.push("xdsoft_other_month");(a.defaultSelect||h.data("changed"))&&e.formatDate(k.currentTime,a.formatDate)===e.formatDate(f,a.formatDate)&&x.push("xdsoft_current");e.formatDate(n,a.formatDate)===e.formatDate(f,a.formatDate)&&x.push("xdsoft_today");0!==f.getDay()&&6!==f.getDay()&&-1===a.weekends.indexOf(e.formatDate(f,a.formatDate))||x.push("xdsoft_weekend");void 0!==a.highlightedDates[e.formatDate(f,a.formatDate)]&& (v=a.highlightedDates[e.formatDate(f,a.formatDate)],x.push(void 0===v.style?"xdsoft_highlighted_default":v.style),I=void 0===v.desc?"":v.desc);a.beforeShowDay&&b.isFunction(a.beforeShowDay)&&x.push(a.beforeShowDay(f));K&&(g+="",K=!1,a.weeks&&(g+=""+E+""));g+='
'+m+"
";f.getDay()===a.dayOfWeekStartPrev&&(g+="",K=!0);f.setDate(m+ 1)}g+="";A.html(g);t.find(".xdsoft_label span").eq(0).text(a.i18n[C].months[k.currentTime.getMonth()]);t.find(".xdsoft_label span").eq(1).text(k.currentTime.getFullYear()+a.yearOffset);z=f=G="";var M=0;!1!==a.minTime&&(l=k.strtotime(a.minTime),M=60*l.getHours()+l.getMinutes());var N=1440;!1!==a.maxTime&&(l=k.strtotime(a.maxTime),N=60*l.getHours()+l.getMinutes());!1!==a.minDateTime&&(l=k.strToDateTime(a.minDateTime),e.formatDate(k.currentTime,a.formatDate)===e.formatDate(l,a.formatDate)&& (z=60*l.getHours()+l.getMinutes(),z>M&&(M=z)));!1!==a.maxDateTime&&(l=k.strToDateTime(a.maxDateTime),e.formatDate(k.currentTime,a.formatDate)===e.formatDate(l,a.formatDate)&&(z=60*l.getHours()+l.getMinutes(),z=N||l'+e.formatDate(f,a.formatTime)+""};if(a.allowTimes&&b.isArray(a.allowTimes)&&a.allowTimes.length)for(l=0;lm;m+=a.step)z=60*l+m,z=N||(f=(10>l?"0":"")+l,z=(10>m?"0":"")+m,g(f,z));y.html(G);c="";for(l=parseInt(a.yearStart,10);l<=parseInt(a.yearEnd,10);l+=1)c+='
'+(l+a.yearOffset)+"
";R.children().eq(0).html(c);l=parseInt(a.monthStart,10);for(c="";l<=parseInt(a.monthEnd,10);l+=1)c+='
'+a.i18n[C].months[l]+"
";H.children().eq(0).html(c);b(h).trigger("generate.xdsoft")},10);g.stopPropagation()}).on("afterOpen.xdsoft",function(){if(a.timepicker){var b,c,d;y.find(".xdsoft_current").length? b=".xdsoft_current":y.find(".xdsoft_init_time").length&&(b=".xdsoft_init_time");b?(c=q[0].clientHeight,d=y[0].offsetHeight,b=y.find(b).index()*a.timeHeightInTimePicker+1,d-cb.deltaY?k.nextMonth():k.prevMonth();return!1});d.on("mousewheel.xdsoft",function(b){if(!a.scrollInput)return!0;if(!a.datepicker&&a.timepicker)return E=y.find(".xdsoft_current").length?y.find(".xdsoft_current").eq(0).index():0,0<=E+b.deltaY&&E+b.deltaYw+q?(p="bottom",f=w+q-c.top):f-=q):f+h[0].offsetHeight>w+q&&(f=c.top-h[0].offsetHeight+1),0>f&&(f=0),e+d.offsetWidth>n&&(e=n-d.offsetWidth));U(h[0],function(b){if("relative"===a.contentWindow.getComputedStyle(b).getPropertyValue("position")&& n>=b.offsetWidth)return e-=(n-b.offsetWidth)/2,!1});c={position:k,left:a.insideParent?d.offsetLeft:e,top:"",bottom:""};c[p]=a.insideParent?d.offsetTop+d.offsetHeight:f;h.css(c)};h.on("open.xdsoft",function(c){var d=!0;a.onShow&&b.isFunction(a.onShow)&&(d=a.onShow.call(h,k.currentTime,h.data("input"),c));if(!1!==d&&(h.show(),J(),b(a.contentWindow).off("resize.xdsoft",J).on("resize.xdsoft",J),a.closeOnWithoutClick))b([a.ownerDocument.body,a.contentWindow]).on("touchstart mousedown.xdsoft",function W(){h.trigger("close.xdsoft"); b([a.ownerDocument.body,a.contentWindow]).off("touchstart mousedown.xdsoft",W)})}).on("close.xdsoft",function(c){var d=!0;t.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide();a.onClose&&b.isFunction(a.onClose)&&(d=a.onClose.call(h,k.currentTime,h.data("input"),c));!1===d||a.opened||a.inline||h.hide();c.stopPropagation()}).on("toggle.xdsoft",function(){h.is(":visible")?h.trigger("close.xdsoft"):h.trigger("open.xdsoft")}).data("input",d);T=0;h.data("xdsoft_datetime",k);h.setOptions(a); k.setCurrentTime(f());d.data("xdsoft_datetimepicker",h).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){d.is(":disabled")||d.data("xdsoft_datetimepicker").is(":visible")&&a.closeOnInputClick||!a.openOnFocus||(clearTimeout(T),T=setTimeout(function(){d.is(":disabled")||(I=!0,k.setCurrentTime(f(),!0),a.mask&&m(a),h.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(c){c=c.which;if(-1!==[13].indexOf(c)&&a.enterLikeTab)return c=b("input:visible,textarea:visible,button:visible,a:visible"), h.trigger("close.xdsoft"),c.eq(c.index(this)+1).focus(),!1;if(-1!==[9].indexOf(c))return h.trigger("close.xdsoft"),!0}).on("blur.xdsoft",function(){h.trigger("close.xdsoft")})};v=function(c){var d=c.data("xdsoft_datetimepicker");d&&(d.data("xdsoft_datetime",null),d.remove(),c.data("xdsoft_datetimepicker",null).off(".xdsoft"),b(a.contentWindow).off("resize.xdsoft"),b([a.contentWindow,a.ownerDocument.body]).off("mousedown.xdsoft touchstart"),c.unmousewheel&&c.unmousewheel())};b(a.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl", function(a){17===a.keyCode&&(l=!0)}).on("keyup.xdsoftctrl",function(a){17===a.keyCode&&(l=!1)}).on("keydown.xdsoftcmd",function(a){}).on("keyup.xdsoftcmd",function(a){});this.each(function(){var l=b(this).data("xdsoft_datetimepicker");if(l){if("string"===b.type(c))switch(c){case "show":b(this).select().focus();l.trigger("open.xdsoft");break;case "hide":l.trigger("close.xdsoft");break;case "toggle":l.trigger("toggle.xdsoft");break;case "destroy":v(b(this));break;case "reset":(this.value=this.defaultValue)&& l.data("xdsoft_datetime").isValidDate(e.parseDate(this.value,a.format))||l.data("changed",!1);l.data("xdsoft_datetime").setCurrentTime(this.value);break;case "validate":l=l.data("input");l.trigger("blur.xdsoft");break;default:l[c]&&b.isFunction(l[c])&&(f=l[c](d))}else l.setOptions(c);return 0}"string"!==b.type(c)&&(!a.lazyInit||a.open||a.inline?n(b(this)):H(b(this)))});return f};b.fn.datetimepicker.defaults=t}; (function(b){"function"===typeof define&&define.amd?define(["jquery","jquery-mousewheel"],b):"object"===typeof exports?module.exports=b(require("jquery")):b(jQuery)})(datetimepickerFactory); (function(b){"function"===typeof define&&define.amd?define(["jquery"],b):"object"===typeof exports?module.exports=b:b(jQuery)})(function(b){function p(f){var c=f||window.event,e=C.call(arguments,1),n=0,p=0,a=0,q=0,v=0,B=0;f=b.event.fix(c);f.type="mousewheel";"detail"in c&&(a=-1*c.detail);"wheelDelta"in c&&(a=c.wheelDelta);"wheelDeltaY"in c&&(a=c.wheelDeltaY);"wheelDeltaX"in c&&(p=-1*c.wheelDeltaX);"axis"in c&&c.axis===c.HORIZONTAL_AXIS&&(p=-1*a,a=0);n=0===a?p:a;"deltaY"in c&&(n=a=-1*c.deltaY);"deltaX"in c&&(p=c.deltaX,0===a&&(n=-1*p));if(0!==a||0!==p){1===c.deltaMode?(q=b.data(this,"mousewheel-line-height"),n*=q,a*=q,p*=q):2===c.deltaMode&&(q=b.data(this,"mousewheel-page-height"),n*=q,a*=q,p*=q);q=Math.max(Math.abs(a),Math.abs(p));if(!d||q